#!/usr/bin/env python3
# -*- coding: utf-8 -*-

'计算一个字符串的MD5指'

import hashlib

# 计算一个字符串的md5码
md5 = hashlib.md5()
md5.update('how to use md5 in'.encode('utf-8'))
md5.update(' python hashlib?'.encode('utf-8'))
print(md5.hexdigest()) # d26a53750bc40b38b65a520292f69306

